package com.ct.dao.searching;

import java.io.Serializable;
import java.io.ObjectStreamException;

/**
 * Created by IntelliJ IDEA.
 * User: nmkravchenko
 * Date: 22.10.2009
 * Time: 17:50:27
 * To change this template use File | Settings | File Templates.
 */
public interface Query<E> extends Serializable {
    public static final EmptyQuery EMPTY_QUERY = new EmptyQuery();

    /**
     * Represents empty queries. Empty queries will be processed in special way.
     */
    static final class EmptyQuery implements Query {
        private EmptyQuery() {
        }

        Object readResolve() throws ObjectStreamException {
            return EMPTY_QUERY;
        }
    }

}
